package org.kjs.common.clone;

import org.kjs.common.clone.exception.CloneNotSupportedException;

/**
 * Created by IntelliJ IDEA.
 * User: KJS
 * Date: 11-8-15
 * Time: 下午7:01
 * To change this template use File | Settings | File Templates.
 */

/**
 * Construct cloneable object's instance.
 * @param <V> Object type
 */
public interface CloneableConstruct<V> {

    /**
     * Construct cloneable object's instance.
     * @return constructed object
     * @throws CloneNotSupportedException construct object fail will throw exception
     */
    V newCloneableInstance () throws CloneNotSupportedException;

    /**
     * Construct cloneable object's instance.
     * @param constructorParameters constructor's parameters
     * @return constructed object
     * @throws CloneNotSupportedException construct object fail will throw exception
     */
    V newCloneableInstance (Object [] constructorParameters) throws CloneNotSupportedException;

}
